﻿<Application 
	x:Class="LatestChatty.App"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
	xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
	xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
	xmlns:sys="clr-namespace:System;assembly=mscorlib"
	xmlns:chattyClasses="clr-namespace:LatestChatty.Classes">

	<!--Application Resources-->
	<Application.Resources>
		<chattyClasses:BooleanToVisibilityConverter x:Key="BoolToVisConverter" FalseValue="Collapsed" TrueValue="Visible"/>
		<chattyClasses:BooleanToVisibilityConverter x:Key="NotBoolToVisConverter" FalseValue="Visible" TrueValue="Collapsed"/>
		<chattyClasses:BooleanToNewColorConverter x:Key="NewReplyConverter" FalseValue="#999999" TrueValue="White" />
		<chattyClasses:PostCategoryConverter x:Name="CategoryConverter"/>
	  
		<Style x:Key="TransitionPage" TargetType="phone:PhoneApplicationPage" >
			<Setter Property="shell:SystemTray.IsVisible" Value="True" />
			<Setter Property="shell:SystemTray.Opacity" Value=".0" />
			<Setter Property="toolkit:TransitionService.NavigationInTransition">
				<Setter.Value>
					<toolkit:NavigationInTransition>
						<toolkit:NavigationInTransition.Backward>
							<toolkit:TurnstileTransition Mode="BackwardIn"/>
						</toolkit:NavigationInTransition.Backward>
						<toolkit:NavigationInTransition.Forward>
							<toolkit:TurnstileTransition Mode="ForwardIn"/>
						</toolkit:NavigationInTransition.Forward>
					</toolkit:NavigationInTransition>
				</Setter.Value>
			</Setter>
			<Setter Property="toolkit:TransitionService.NavigationOutTransition">
				<Setter.Value>
					<toolkit:NavigationOutTransition>
						<toolkit:NavigationOutTransition.Backward>
							<toolkit:TurnstileTransition Mode="BackwardOut"/>
						</toolkit:NavigationOutTransition.Backward>
						<toolkit:NavigationOutTransition.Forward>
							<toolkit:TurnstileTransition Mode="ForwardOut"/>
						</toolkit:NavigationOutTransition.Forward>
					</toolkit:NavigationOutTransition>
				</Setter.Value>
			</Setter>
		</Style>
		
		<Style x:Key="LoadMoreButton" TargetType="Button">
			<Setter Property="BorderThickness" Value="0" />
			<Setter Property="FontFamily" Value="Segoe WP SemiLight" />
			<Setter Property="FontSize" Value="40" />
			<Setter Property="FontWeight" Value="Thin" />
			<Setter Property="Margin" Value="0" />
			<Setter Property="Padding" Value="0" />
		</Style>
		
		<Style x:Key="SettingsToggleSwitch" TargetType="toolkit:ToggleSwitch">
			<Setter Property="Margin" Value="0, -15, 0, -15" />
		</Style>
	</Application.Resources>

	<Application.ApplicationLifetimeObjects>
		<!--Required object that handles lifetime events for the application-->
		<shell:PhoneApplicationService 
			Launching="Application_Launching" Closing="Application_Closing" 
			Activated="Application_Activated" Deactivated="Application_Deactivated"/>
	</Application.ApplicationLifetimeObjects>

</Application>